'\" te
.\" Copyright (c) 2017 Peter Tribble
.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH AUDIT_WARN 8 "May 21, 2022"
.SH NAME
audit_warn \- audit daemon warning script
.SH SYNOPSIS
.nf
\fB/etc/security/audit_warn\fR [\fIoption\fR [\fIarguments\fR]]
.fi

.SH DESCRIPTION
The \fBaudit_warn\fR utility processes warning or error messages from the audit
daemon. When a problem is encountered, the audit daemon, \fBauditd\fR(8) calls
\fBaudit_warn\fR with the appropriate arguments. The \fIoption\fR argument
specifies the error type.
.sp
.LP
The system administrator can specify a list of mail recipients to be notified
when an audit_warn situation arises by defining a mail alias called
\fBaudit_warn\fR in \fBaliases\fR(5). The users that make up the
\fBaudit_warn\fR alias are typically the \fBaudit\fR and \fBroot\fR users.
.SH OPTIONS
The following options are supported:
.sp
.ne 2
.na
\fB\fBallhard\fR \fIcount\fR\fR
.ad
.sp .6
.RS 4n
Indicates that the hard limit for all filesystems has been exceeded \fIcount\fR
times. The default action for this option is to send mail to the
\fBaudit_warn\fR alias only if the \fIcount\fR is \fB1\fR, and to write a
message to the machine console every time. It is recommended that mail
\fInot\fR be sent every time as this could result in a the saturation of the
file system that contains the mail spool directory.
.RE

.sp
.ne 2
.na
\fB\fBallsoft\fR\fR
.ad
.sp .6
.RS 4n
Indicates that the soft limit for all filesystems has been exceeded. The
default action for this option is to send mail to the \fBaudit_warn\fR alias
and to write a message to the machine console.
.RE

.sp
.ne 2
.na
\fB\fBauditoff\fR\fR
.ad
.sp .6
.RS 4n
Indicates that someone other than the audit daemon changed the system audit
state to something other than \fB\fR\fBAUC_AUDITING\fR\fB\&. \fR The audit
daemon will have exited in this case. The default action for this option is to
send mail to the \fBaudit_warn\fR alias and to write a message to the machine
console.
.RE

.sp
.ne 2
.na
\fB\fBhard\fR \fIfilename\fR\fR
.ad
.sp .6
.RS 4n
Indicates that the hard limit for the file has been exceeded. The default
action for this option is to send mail to the \fBaudit_warn\fR alias and to
write a message to the machine console.
.RE

.sp
.ne 2
.na
\fB\fBnostart\fR\fR
.ad
.sp .6
.RS 4n
Indicates that auditing could not be started. The default action for this
option is to send mail to the \fBaudit_warn\fR alias and to write a message to
the machine console. Some administrators may prefer to modify \fBaudit_warn\fR
to reboot the system when this error occurs.
.RE

.sp
.ne 2
.na
\fB\fBplugin\fR \fIname\fR \fIerror\fR \fIcount\fR \fItext\fR\fR
.ad
.sp .6
.RS 4n
Indicates that an error occurred during execution of the \fBauditd\fR plugin
\fIname\fR. The default action for this option is to send mail to the
\fBaudit_warn\fR alias only if \fIcount\fR is 1, and to write a message to the
machine console every time. (Separate counts are kept for each error type.) It
is recommended that mail not be sent every time as this could result in the
saturation of the file system that contains the mail spool directory. The
\fItext\fR field provides the detailed error message passed from the plugin.
The \fIerror\fR field is one of the following strings:
.sp
.ne 2
.na
\fB\fBload_error\fR\fR
.ad
.RS 16n
Unable to load the plugin \fIname\fR.
.RE

.sp
.ne 2
.na
\fB\fBsys_error\fR\fR
.ad
.RS 16n
The plugin \fIname\fR is not executing due to a system error such as a lack of
resources.
.RE

.sp
.ne 2
.na
\fB\fBconfig_error\fR\fR
.ad
.RS 16n
No plugins loaded (including the binary file plugin, \fBaudit_binfile\fR(7))
due to configuration errors. The name string is
\fB--\fR to indicate that no plugin name applies.
.RE

.sp
.ne 2
.na
\fB\fBretry\fR\fR
.ad
.RS 16n
The plugin \fIname\fR reports it has encountered a temporary failure.
.RE

.sp
.ne 2
.na
\fB\fBno_memory\fR\fR
.ad
.RS 16n
The plugin \fIname\fR reports a failure due to lack of memory.
.RE

.sp
.ne 2
.na
\fB\fBinvalid\fR\fR
.ad
.RS 16n
The plugin \fIname\fR reports it received an invalid input.
.RE

.sp
.ne 2
.na
\fB\fBfailure\fR\fR
.ad
.RS 16n
The plugin \fIname\fR has reported an error as described in \fItext\fR.
.RE

.RE

.sp
.ne 2
.na
\fB\fBsoft\fR \fIfilename\fR\fR
.ad
.sp .6
.RS 4n
Indicates that the soft limit for \fIfilename\fR has been exceeded. The default
action for this option is to send mail to the \fBaudit_warn\fR alias and to
write a message to the machine console.
.RE

.sp
.ne 2
.na
\fB\fBtmpfile\fR\fR
.ad
.sp .6
.RS 4n
Indicates that there was a problem creating a symlink from
\fB/var/run/.audit.log\fR to the current audit log file.
.RE

.SH ATTRIBUTES
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
.TE

.sp
.LP
The interface stability is evolving. The file content is unstable.
.SH SEE ALSO
.BR aliases (5),
.BR audit.log (5),
.BR attributes (7),
.BR audit (8),
.BR auditd (8)
.SH NOTES
If the audit policy \fBperzone\fR is set, the \fB/etc/security/audit_warn\fR
script for the local zone is used for notifications from the local zone's
instance of \fBauditd\fR. If the \fBperzone\fR policy is not set, all
\fBauditd\fR errors are generated by the global zone's copy of
\fB/etc/security/audit_warn\fR.
